import request from '@/utils/request'

// 查询执行模板主机列表
export function listHost(query) {
  return request({
    url: '/os/host/list',
    method: 'get',
    params: query
  })
}

// 查询执行模板主机详细
export function getHost(id) {
  return request({
    url: '/os/host/' + id,
    method: 'get'
  })
}

// 新增执行模板主机
export function addHost(data) {
  return request({
    url: '/os/host',
    method: 'post',
    data: data
  })
}

// 修改执行模板主机
export function updateHost(data) {
  return request({
    url: '/os/host',
    method: 'put',
    data: data
  })
}

// 删除执行模板主机
export function delHost(id) {
  return request({
    url: '/os/host/' + id,
    method: 'delete'
  })
}


// 规格信息添加
export function addHostSpec(data) {
  return request({
    url: '/os/attr',
    method: 'post',
    data: data
  })
}

// 规格信息修改
export function updateHostSpec(data) {
  return request({
    url: '/os/attr',
    method: 'put',
    data: data  
  })
} 

// 规格信息查询
export function getHostSpec(id) {
  return request({
    url: '/os/attr/' + id,    
    method: 'get'
  })
}     

// SSH 新增
export function addHostSsh(data) {
  return request({
    url: '/os/config',      
    method: 'post',
    data: data
  })
} 

//SSH 查询
export function getHostSsh(id) {
  return request({
    url: '/os/config/' + id,      
    method: 'get'
  })
}     

// SSH 修改
export function updateHostSsh(data) {
  return request({
    url: '/os/config',      
    method: 'put',
    data: data
  })
} 

// 测试 SSH 连接
export function testHostSsh(data) {
  return request({    
    url: '/os/config/test',      
    method: 'post',
    data: data
  })
} 

// 身份认证数据
export function getIdentityList() {
 return request({    
    url: '/os/identity/datas',      
    method: 'get'
  })
} 




